package org.example;
//领养记录实体类，对应数据库表 adoption_records

import java.time.LocalDateTime;

public class AdoptionRecord {
    private Integer id;       //记录id
    private Integer petId;   // 宠物id
    private String adopterName;
    private String adopterPhone;
    private LocalDateTime adoptionDate;

    public AdoptionRecord(Integer id,Integer petId,String adopterName,String adopterPhone,LocalDateTime adoptionDate){
        this.id=id;
        this.petId=petId;
        this.adopterName=adopterName;
        this.adopterPhone=adopterPhone;
        this.adoptionDate=adoptionDate;
    }

    public Integer getId() { return id; }
    public void setId(Integer id) { this.id = id; }

    public Integer getPetId() { return petId; }
    public void setPetId(Integer petId) { this.petId = petId; }

    public String getAdopterName() { return adopterName; }
    public void setAdopterName(String adopterName) { this.adopterName = adopterName; }

    public String getAdopterPhone() { return adopterPhone; }
    public void setAdopterPhone(String adopterPhone) { this.adopterPhone = adopterPhone; }

    public LocalDateTime getAdoptionDate() { return adoptionDate; }
    public void setAdoptionDate(LocalDateTime adoptionDate) { this.adoptionDate = adoptionDate; }

    @Override
    public String toString() {
        return "【领养记录】\n" +
                "编号        ：" + id + "\n" +
                "宠物ID      ：" + petId + "\n" +
                "领养人姓名  ：" + adopterName + "\n" +
                "联系电话    ：" + adopterPhone + "\n" +
                "领养时间    ：" + adoptionDate;
    }
}
